//
//  XHResponse.h
//  HTTPTEST
//
//  Created by edz on 2020/7/3.
//  Copyright © 2020 LI. All rights reserved.
//
/*数据返回类，用户可以继承定制，格式化返回数据*/
#import <Foundation/Foundation.h>
#import "XHError.h"
NS_ASSUME_NONNULL_BEGIN

@interface XHResponse : NSObject
@property (nonatomic, assign) BOOL isOK;
@property (nonatomic, assign) id data;
//保留字段 子类处理
@property (nonatomic, assign) id formatData;

@property (nonatomic, assign) NSInteger code;
@property (nonatomic, strong) XHError *error;
//这里子类负责配置相应规则
- (void)configWithJson:(NSDictionary *)json;

- (void)parse;
@end

NS_ASSUME_NONNULL_END
